<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnReplyMessageInMessageTable extends AbstractMigration
{
    public function up()
    {
        $this->table('message')
            ->addColumn('reply_message_id','integer', ['signed' => false, 'default' => 0, 'limit' => 11, 'comment' => '回复消息ID'])
            ->addColumn('message_reply_id', 'integer', ['signed' => false, 'default' => 0, 'limit' => 11, 'comment' => '回复消息组ID'])
            ->save();
    }

    public function down()
    {
        $this->table('message')
            ->removeColumn('reply_message_id')
            ->removeColumn('message_reply_id')
            ->save();
    }
}
